package com.hnluchuan.bmjlearning.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.hnluchuan.core.model.BaseModel;

import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 短信
 */
@Entity
@Table(name = "t_sms") 
public class Sms extends BaseModel {
	private static final long serialVersionUID = 1L;
	
	public Sms() {
	}
	
	public Sms(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
	private Long id;
	/**
	 * 手机号码
	 */
	@Column(name = "mobile")    		
	private String mobile;
	/**
	 * 验证码
	 */
	@Column(name = "code")    		
	private String code;
	/**
	 * 完整的短信消息
	 */
	@Column(name = "msg")    		
	private String msg;
	/**
	 * 1, 更改密码
	 */
	@Column(name = "type")    		
	private Integer type;
	/**
	 *  失效时间
	 */
	@DateTimeFormat(pattern = "")
	@Column(name = "expire_date")
	private Date expireDate;
	/**
	 * 创建时间/发送时间
	 */
	@DateTimeFormat(pattern = "")
	@Column(name = "created")
	private Date created;
	/**
	 * 是否已经使用了，默认0
	 */
	@Column(name = "used")    		
	private Boolean used;
	// fields end
	
	/** id */
	public Long getId() {
    	return id;
    }
    /** id */
    public void setId(Long id) {
    	this.id = id;
    }
	/** 手机号码 */
	public String getMobile() {
    	return mobile;
    }
    /** 手机号码 */
    public void setMobile(String mobile) {
    	this.mobile = mobile;
    }
	/** 验证码 */
	public String getCode() {
    	return code;
    }
    /** 验证码 */
    public void setCode(String code) {
    	this.code = code;
    }
	/** 完整的短信消息 */
	public String getMsg() {
    	return msg;
    }
    /** 完整的短信消息 */
    public void setMsg(String msg) {
    	this.msg = msg;
    }
	/** 1, 更改密码 */
	public Integer getType() {
    	return type;
    }
    /** 1, 更改密码 */
    public void setType(Integer type) {
    	this.type = type;
    }
	/**  失效时间 */
	public Date getExpireDate() {
    	return expireDate;
    }
    /**  失效时间 */
    public void setExpireDate(Date expireDate) {
    	this.expireDate = expireDate;
    }
	/** 创建时间/发送时间 */
	public Date getCreated() {
    	return created;
    }
    /** 创建时间/发送时间 */
    public void setCreated(Date created) {
    	this.created = created;
    }
	/** 是否已经使用了，默认0 */
	public Boolean getUsed() {
    	return used;
    }
    /** 是否已经使用了，默认0 */
    public void setUsed(Boolean used) {
    	this.used = used;
    }
	
}
